package com.jeespring.concurrency.publish;

import lombok.extern.slf4j.Slf4j;

import java.util.Arrays;

@Slf4j
public class UnSafePublish {
    private String[] array = {"a", "b", "c"};

    public String[] getArray() {
        return array;
    }

    public static void main(String[] args) {
        UnSafePublish unSafePublish = new UnSafePublish();

        log.info("{}", Arrays.toString(unSafePublish.getArray()));
        String[] array = unSafePublish.getArray();
        array[0] = "A";
        log.info("{}", Arrays.toString(unSafePublish.getArray()));

    }
}
